#if defined(_MSC_VER)
#pragma once
#endif

#ifndef LM_SHAPRE_DISK_H
#define LM_SHAPRE_DISK_H

#include "../core/lm.h"
#include "../core/shape.h"

class Disk : public Shape {
public:
	Disk(const Transform *o2w, const Transform *w2o, bool ro, Reference<Material> mat, float rd, float ht);
	BBox ObjectBound() const;
	bool Intersect(const Ray &ray, Intersection *isect) const;
	bool IntersectP(const Ray &ray) const;
	void FillIntersection(const Ray &ray, Intersection *isect) const;
	float Area() const;
	Point3 Sample(const Point2 &sample, Normal *Ns) const;
	// Public data
	float radius;
	float height;
};

#endif	// LM_SHAPRE_DISK_H